package experiment02;

public class Auto {
    int NumberOfTires;
    String Color;
    int Weight;
    float Speed;

    public Auto(int numberOfTires, String color, int weight, float speed) {
        this.NumberOfTires = numberOfTires;
        this.Color = color;
        this.Weight = weight;
        this.Speed = speed;
    }

    public Auto() {

    }

    public int getNumberOfTires() {
        return NumberOfTires;
    }

    public void setNumberOfTires(int numberOfTires) {
        NumberOfTires = numberOfTires;
    }

    public String getColor() {
        return Color;
    }

    public void setColor(String color) {
        Color = color;
    }

    public int getWeight() {
        return Weight;
    }

    public void setWeight(int weight) {
        Weight = weight;
    }

    public float getSpeed() {
        return Speed;
    }

    public void setSpeed(float speed) {
        Speed = speed;
    }

    public void jiasu() {
        System.out.println("加速");
    }

    public void jiansu() {
        System.out.println("减速");
    }

    public void tingche() {
        System.out.println("停车");
    }

    public void run() {
        System.out.println("这个汽车有" + NumberOfTires + "个轮胎，" + "颜色是" + Color + "重量" + Weight + "吨" + "最大行驶速度为" + Speed + "Km/h");
    }
}
